package top.wettis.chat.controller;

import cn.dev33.satoken.annotation.SaCheckRole;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.wettis.chat.pojo.VO.Result;
import top.wettis.chat.service.impl.TaskServiceImpl;

/**
 * <p>
 * 任务表 前端控制器
 * </p>
 *
 * @author wettis
 * @since 2023-03-25
 */
@RestController
@RequestMapping("/task")
public class TaskController {

    private final TaskServiceImpl taskService;

    public TaskController(TaskServiceImpl taskService) {
        this.taskService = taskService;
    }

    @GetMapping
    @SaCheckRole("USER")
    public Result<Object> GetTask(){
        return taskService.getTask();
    }
}
